﻿''' <summary>
''' 面源
''' </summary>
''' <remarks></remarks>
<Serializable()> Public Class Area

    ''' <summary>
    ''' 散发率[g/s/m2]
    ''' </summary>
    ''' <remarks></remarks>
    Private m_EmissRate As Double = 1 '散发率[g/s/m2]
    ''' <summary>
    ''' 源的释放高度[M]
    ''' </summary>
    ''' <remarks></remarks>
    Private m_SReleHigh As Double = 5 '源的释放高度[M]
    ''' <summary>
    ''' 矩形区域的大边角长度[M]
    ''' </summary>
    ''' <remarks></remarks>
    Private m_LRectLeng As Double = 200 '矩形区域的大边角长度[M]
    ''' <summary>
    ''' 矩形区域的小边角长度[M]
    ''' </summary>
    ''' <remarks></remarks>
    Private m_SRectLeng As Double = 100 '矩形区域的小边角长度[M]
    ''' <summary>
    ''' 风向的搜索范围
    ''' </summary>
    ''' <remarks></remarks>
    Private m_WindSearch As String = "N"  '风向的搜索范围
    ''' <summary>
    ''' 风向的相对量[deg]
    ''' </summary>
    ''' <remarks></remarks>
    Private m_WindRelat As Double = 1 '风向的相对量[deg]
    ''' <summary>
    ''' 接收的海拔高度[M]
    ''' </summary>
    ''' <remarks></remarks>
    Private m_RecepHigh As Double = 0 '接收的海拔高度[M]
    Private m_ComboxUnitOption As Integer = 0 '单位的选择默认为0
    ''' <summary>
    ''' 单位的选择默认为0
    ''' </summary>
    ''' <value></value>
    ''' <returns></returns>
    ''' <remarks></remarks>
    Property ComboxUnitOption() As Integer
        Get
            Return m_ComboxUnitOption
        End Get
        Set(ByVal value As Integer)
            m_ComboxUnitOption = value
        End Set
    End Property

    ''' <summary>
    ''' 散发率[g/s/m2]
    ''' </summary>
    ''' <value></value>
    ''' <returns></returns>
    ''' <remarks></remarks>
    Property EmissRate() As Double
        Get
            Return m_EmissRate
        End Get
        Set(ByVal value As Double)
            m_EmissRate = value
        End Set
    End Property
    ''' <summary>
    ''' 源的释放高度[M]
    ''' </summary>
    ''' <value></value>
    ''' <returns></returns>
    ''' <remarks></remarks>
    Property SReleHigh() As Double
        Get
            Return m_SReleHigh
        End Get
        Set(ByVal value As Double)
            m_SReleHigh = value
        End Set
    End Property
    ''' <summary>
    ''' 矩形区域的大边角长度[M]
    ''' </summary>
    ''' <value></value>
    ''' <returns></returns>
    ''' <remarks></remarks>
    Property LRectLeng() As Double
        Get
            Return m_LRectLeng
        End Get
        Set(ByVal value As Double)
            m_LRectLeng = value
        End Set
    End Property
    ''' <summary>
    ''' 矩形区域的小边角长度[M]
    ''' </summary>
    ''' <value></value>
    ''' <returns></returns>
    ''' <remarks></remarks>
    Property SRectLeng() As Double
        Get
            Return m_SRectLeng
        End Get
        Set(ByVal value As Double)
            m_SRectLeng = value
        End Set
    End Property
    ''' <summary>
    ''' 风向的搜索范围
    ''' </summary>
    ''' <value></value>
    ''' <returns></returns>
    ''' <remarks></remarks>
    Property WindSearch() As String
        Get
            Return m_WindSearch
        End Get
        Set(ByVal value As String)
            m_WindSearch = value
        End Set
    End Property
    ''' <summary>
    ''' 风向的相对量[deg]
    ''' </summary>
    ''' <value></value>
    ''' <returns></returns>
    ''' <remarks></remarks>
    Property WindRelat() As Double
        Get
            Return m_WindRelat
        End Get
        Set(ByVal value As Double)
            m_WindRelat = value
        End Set
    End Property
    ''' <summary>
    ''' 接收的海拔高度[M]
    ''' </summary>
    ''' <value></value>
    ''' <returns></returns>
    ''' <remarks></remarks>
    Property RecepHigh() As Double
        Get
            Return m_RecepHigh
        End Get
        Set(ByVal value As Double)
            m_RecepHigh = value
        End Set
    End Property
    ''' <summary>
    ''' 面源的字符串
    ''' </summary>
    ''' <returns></returns>
    ''' <remarks></remarks>
    Public Function Area()
        Dim StrA As String = ""
        If Me.ComboxUnitOption = 1 Then
            StrA = Me.EmissRate / (Me.SRectLeng * Me.LRectLeng) & vbCrLf & Me.SReleHigh & vbCrLf & Me.LRectLeng & vbCrLf & Me.SRectLeng & vbCrLf & Me.RecepHigh & vbCrLf
        ElseIf Me.ComboxUnitOption = 2 Then
            StrA = Me.EmissRate / (Me.SRectLeng * Me.LRectLeng * 3.6) & vbCrLf & Me.SReleHigh & vbCrLf & Me.LRectLeng & vbCrLf & Me.SRectLeng & vbCrLf & Me.RecepHigh & vbCrLf
        Else
            StrA = Me.EmissRate & vbCrLf & Me.SReleHigh & vbCrLf & Me.LRectLeng & vbCrLf & Me.SRectLeng & vbCrLf & Me.RecepHigh & vbCrLf
        End If
        Return StrA
    End Function
End Class
